﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Proggy.Web.Cms.PropertyTypes;
using Proggy.Web.Cms.Core.Models;

namespace Proggy.Web.Cms.Core.Configuration.ConfigObjects
{
    /// <summary>
    /// Config object
    /// </summary>
    public class TagsConfigObject : PropertyTypeConfigObjectBase
    {
        /// <summary>
        /// The type of tagging (FreeText_Suggest = default)
        /// </summary>
        public TaggingType TypeOfTagging { get { return this._typeOfTagging; } set { this._typeOfTagging = value; } }
        private TaggingType _typeOfTagging = TaggingType.FreeTextSuggestFromPublishedContent;

        /// <summary>
        /// The min number of tags (0 = default)
        /// </summary>
        public int MinTags { get { return this._minTags; } set { this._minTags = value; } }
        private int _minTags = 0;

        /// <summary>
        /// The max number of tags (0 = default / no limit)
        /// </summary>
        public int MaxTags { get { return this._maxTags; } set { this._maxTags = value; } }
        private int _maxTags = 0;

        /// <summary>
        /// Random data category name for locked list (default = "Tags")
        /// </summary>
        public string LockedListRandomDataCategoryName { get { return this._lockedCat; } set { this._lockedCat = value; } }
        private string _lockedCat = "Tags";
    }

    /// <summary>
    /// Type of tagging scenario
    /// </summary>
    public enum TaggingType
    {
        FreeText, FreeTextSuggestFromPublishedContent, LockedListSuggestFromRandomData
    }
}
